#!/bin/env python
#-*- coding:utf-8 -*-

menu = {
	"Beijing":{
		"Haidian":["Taixiang","Gaode","Mudanyuan","Jiandemen"],
		"Chaoyang":["Aosen","sss"],
		"Shijingshan":["Pingguoyuan",".."],
		"Changping":["Shigezhuang","Shangzhuang"]
	},	
	"Tianjin":{
		"Tanggu":["Xigu","Donggu"],
		"Binhai":["Gaoxinqu","Waitan"]
	},
}

exitFlag = False
while not exitFlag:
	for index,key in enumerate(menu.keys()):
		print index,key
	choice_1 = raw_input("Please in choice the menu enter:").strip()
	if choice_1.isdigit():
		choice_1 = int(choice_1)
		key_1 = menu.keys()[choice_1]
		while not exitFlag:
			for index,key in enumerate(menu[key_1]):
				print "-->",index,key 
			choice_2 = raw_input("Please in choice the menu enter:").strip()
			if choice_2.isdigit():
				choice_2 = int(choice_2)
				key_2 = menu[key_1].keys()[choice_2]
				while not exitFlag:
					for index,key in enumerate(menu[key_1][key_2]):
						print "-->-->",index,key
					choice_3 = raw_input("Please in choice the menu enter:").strip()
					if choice_3.isdigit():
						print "This is the last level!"
					elif choice_3 == 'quit':
						exitFlag = True
					elif choice_3 == 'back':
						break
else:
	print "==========Going to exit!=============="